import request from '@/router/axios';

export const getList = (page, size, params) => {
  return request({
    url: '/base/sellerUserGoodsClass/listUserGoodsClass',
    method: 'post',
    params: {
      ...params,
      page,
      size,
    }
  })
}
export const remove = (id) => {
  return request({
    url: '/base/sellerUserGoodsClass/delete',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      id,
    }
  })
}
export const batchDelete = (ids) => {
  return request({
    url: '/base/sellerUserGoodsClass/batchDelete',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/base/sellerUserGoodsClass/addItem',
    method: 'post',
    // meta: {
    //   isSerialize: true,
    // },
    params: row
  })
}

export const update = (row) => {
  return request({
    url: '/base/sellerUserGoodsClass/editItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}

export const changeStatus = (userId, status) => {
  return request({
    url: '/base/userGoodsClass/changeStatus',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      userId,
      status
    }
  })
}